using Awesome.Extensions.Enumerable;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Awesome.Extensions.Nullable;
using Awesome.Extensions.QualityTools;

namespace Awesome.Extensions.Tests
{
    [TestClass]
    public class NullableTest
    {
        [TestMethod]
        public void TestNullable()
        {
            int? x = null;
            x.DefaultValue(10).AssertEquals(10);

            int? y = 20;
            y.DefaultValue(10).AssertNotEquals(10);

            IE.New<int?>(10, 20, 30, null, 40, 50, null, 70)
                .OnlyWithValue()
                .AssertSequenceEqual(IE.New(10, 20, 30, 40, 50, 70));

            int? z = 10;
            z.ValueEquals(10).AssertTrue();
            z = null;
            z.ValueEquals(10).AssertFalse();
            z = 11;
            z.ValueEquals(10).AssertFalse();

        }


    }
}